package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TableSelfServiceBillingRulesMapper;
import com.ruoyi.system.domain.TableSelfServiceBillingRules;
import com.ruoyi.system.service.ITableSelfServiceBillingRulesService;

/**
 * 桌台自助计费规则Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-09
 */
@Service
public class TableSelfServiceBillingRulesServiceImpl implements ITableSelfServiceBillingRulesService
{
    @Autowired
    private TableSelfServiceBillingRulesMapper tableSelfServiceBillingRulesMapper;

    /**
     * 通过id查询桌台自助计费规则
     *
     * @param id 桌台自助计费规则主键
     * @return 桌台自助计费规则
     */
    @Override
    public TableSelfServiceBillingRules selectTableSelfServiceBillingRulesById(Long id)
    {
        return tableSelfServiceBillingRulesMapper.selectTableSelfServiceBillingRulesById(id);
    }

    /**
     * 查询桌台自助计费规则列表
     *
     * @param tableSelfServiceBillingRules 桌台自助计费规则
     * @return 桌台自助计费规则
     */
    @Override
    public List<TableSelfServiceBillingRules> selectTableSelfServiceBillingRulesList(TableSelfServiceBillingRules tableSelfServiceBillingRules)
    {
        return tableSelfServiceBillingRulesMapper.selectTableSelfServiceBillingRulesList(tableSelfServiceBillingRules);
    }

    /**
     * 新增桌台自助计费规则
     *
     * @param tableSelfServiceBillingRules 桌台自助计费规则
     * @return 结果
     */
    @Override
    public int insertTableSelfServiceBillingRules(TableSelfServiceBillingRules tableSelfServiceBillingRules)
    {
        return tableSelfServiceBillingRulesMapper.insertTableSelfServiceBillingRules(tableSelfServiceBillingRules);
    }

    /**
     * 修改桌台自助计费规则
     *
     * @param tableSelfServiceBillingRules 桌台自助计费规则
     * @return 结果
     */
    @Override
    public int updateTableSelfServiceBillingRules(TableSelfServiceBillingRules tableSelfServiceBillingRules)
    {
        return tableSelfServiceBillingRulesMapper.updateTableSelfServiceBillingRules(tableSelfServiceBillingRules);
    }

    /**
     * 通过id批量删除桌台自助计费规则信息
     *
     * @param ids 需要删除的桌台自助计费规则主键
     * @return 结果
     */
    @Override
    public int deleteTableSelfServiceBillingRulesByIds(Long[] ids)
    {
        return tableSelfServiceBillingRulesMapper.deleteTableSelfServiceBillingRulesByIds(ids);
    }

    /**
     * 通过id删除桌台自助计费规则信息
     *
     * @param id 桌台自助计费规则主键
     * @return 结果
     */
    @Override
    public int deleteTableSelfServiceBillingRulesById(Long id)
    {
        return tableSelfServiceBillingRulesMapper.deleteTableSelfServiceBillingRulesById(id);
    }
}
